/* 这是用户注册登录路由模块 */

const express = require('express')
const router = express.Router()
const userHandler = require('../../router_handler/module5/user')


// 获取所有用户信息
router.get('/module5/users', userHandler.getAllUsers)
router.get('/module5/vips', userHandler.getAllVip)
router.get('/module5/Businessmen', userHandler.getAllBusinessmen)
router.get('/module5/blacklists', userHandler.getAllBlacklist)
router.get('/module5/inspector', userHandler.getAllInspector)
router.get('/module5/administrator', userHandler.getAllAministrator)



// 搜索指定用户名
router.get('/module5/users/id/:value', userHandler.searchUsersID)
router.get('/module5/users/specficid/:value', userHandler.searchSpecificUsersID)

// 搜索指定用户名
router.get('/module5/users/name/:value', userHandler.searchUsersName)


// 删除指定用户
router.get('/module5/users/:id', userHandler.deleteUsers)

// 修改指定用户的信息
router.get('/module5/users/update/:id/:isVip/:isBusinessmen/:isBlacklist/:isInspector/:isAdministrator', userHandler.updateIdentity)

// 将路由对象共享出去
module.exports = router